package com.sky.service;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.EnableCaching;

import java.util.List;

public interface ShoppingCartService {


    /**
     * 添加购物车
     * @param shoppingCartDTO
     */

    void addShoppingCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 根据用户id查询购物车
     * @return
     */
    List<ShoppingCart> listShoppingCart();


    /**
     * 根据用户id和菜品id删除购物车
     * @param shoppingCartDTO
     */
    void deleteShoppingCart(ShoppingCartDTO shoppingCartDTO);


    /**
     * 清空购物车
     */
    void cleanShoppingCart();
}
